package com.yinxin.thread.state;

/**
 * @author yinxin
 * @Title:
 * @Package
 * @Description:
 * @date 2022/1/815:55
 */
public class TestPriority {
    public static void main(String[] args) {
        MyProcess myProcess1 = new MyProcess();
        MyProcess myProcess2 = new MyProcess();
        MyProcess myProcess3 = new MyProcess();

        myProcess2.setPriority(1);
        myProcess1.setPriority(3);
        myProcess3.setPriority(2);

        myProcess2.start();
        myProcess1.start();
        myProcess3.start();
    }
    static class MyProcess extends Thread{
        @Override
        public void run() {
            System.out.println("我是MyProcess"+Thread.currentThread().getName());
        }
    }
}
